import java.math.BigInteger;

public class problem20 {
    public static BigInteger factorial(BigInteger number) {
        if (number.compareTo(BigInteger.ONE) <= 0) {
            return number;
        } else {
            return number.multiply(factorial(number.subtract(BigInteger.ONE)));
        }
    }

    public static void main(String[] args) {
        String hundredFactorial = factorial(BigInteger.valueOf(100)).toString();
        int sum = 0;
        for (int i = 0; i < hundredFactorial.length() - 1; i++) {
            sum += Integer.valueOf(hundredFactorial.substring(i, i +1));
        }
        System.out.println(sum);
    }
}
